//
//  DownLoadingCell.m
//  HuateVideo
//
//  Created by zhengchen on 12-7-28.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import "DownLoadingCell.h"


@implementation DownLoadingCell
@synthesize progressView;
@synthesize cellimage;
@synthesize downloadTitle;
@synthesize sizelabel,statelabel;
@synthesize  fabu,shanchu;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code.
		cellimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 75, 95)];
        cellimage.image = [UIImage imageNamed:@"dengdai.png"];
        [self.contentView addSubview:cellimage];
        cellimage.userInteractionEnabled=YES;

		downloadTitle = [[UILabel alloc]initWithFrame:CGRectMake(95, 10, 220, 20)];
        downloadTitle.textColor = LIGHT_COLOR;
        downloadTitle.font = [UIFont systemFontOfSize:16.0];
        downloadTitle.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:downloadTitle];
		
		sizelabel = [[UILabel alloc]initWithFrame:CGRectMake(95, 35, 150, 20)];
        sizelabel.textColor = [UIColor lightGrayColor];
        sizelabel.font = [UIFont systemFontOfSize:14.0];
        sizelabel.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:sizelabel];
		
		progressView = [[UIProgressView alloc]initWithFrame:CGRectMake(95, 57, 215, 10)];
		progressView.progress = 0;
		progressView.tag=1000;
		if ([progressView respondsToSelector:@selector(setProgressTintColor:)]) {
			[progressView performSelector:@selector(setProgressTintColor:) withObject:[UIColor greenColor]]; 
		}
		[self.contentView addSubview:progressView];
		
		
		fabu = [UIButton buttonWithType:UIButtonTypeCustom];
        fabu.frame = CGRectMake(190, 79, 55, 26);
        fabu.titleLabel.font = [UIFont systemFontOfSize:12.0];
        [fabu setBackgroundImage:[UIImage imageNamed:@"liangzianniu.png"] forState:UIControlStateNormal];
        [self.contentView addSubview:fabu];
		
		statelabel=[[UILabel alloc] initWithFrame:CGRectMake(95, 79, 100, 26)];
		statelabel.backgroundColor=[UIColor clearColor];
		statelabel.textColor=[UIColor greenColor];
		[self.contentView addSubview:statelabel];
       
        
        shanchu = [UIButton buttonWithType:UIButtonTypeCustom];
        shanchu.frame = CGRectMake(255, 79, 55, 26);
        shanchu.titleLabel.font = [UIFont systemFontOfSize:12.0];
        [shanchu setBackgroundImage:[UIImage imageNamed:@"liangzianniu.png"] forState:UIControlStateNormal];
        [shanchu setTitle:LS(@"删除") forState:UIControlStateNormal];
        [self.contentView addSubview:shanchu];
        
        UIImageView *line = [[UIImageView alloc]initWithFrame:CGRectMake(0, 114, 320, 2)];
        line.image = [UIImage imageNamed:@"fengexian.png"];
        [self.contentView addSubview:line];
        [line release];
		
    }
    return self;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state.
}


- (void)dealloc {
	[statelabel release];
	 [progressView release];
	 [cellimage release];
	 [downloadTitle release];
	 [sizelabel release];
    [super dealloc];
}


@end
